<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义函数</title>
    <style>
        .img{
            width: 500px;
            height: auto;
        }
    </style>
</head>
<body>
<p>111</p>
<p>222</p>
<p>333</p>
<p>444</p>
<p>555</p>
<p>666</p>
<div class="img">
    <img src="50.jpg" alt="鞠婧祎">

</div>
<button class="btu">缩小图片</button>
    <button class="btu2">虚化</button>
    <button class="btu3">还原</button>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script>
    $(".btu").click(function(){
        $(".img").animate({width:"300px",hiegh:"300px"});
       });
    $('.btu2').click(function () {
        $('.img').fadeTo(3000,0.44)
    });
    $('.btu3').click(function () {
        $('.img').fadeToggle(3000)
    });
    $.extend({
        myPrint:function () {
            console.log('666666')
        }
    });
    $.myPrint();

    $.fn.extend({
        getText:function () {
            $.each($('p'),function () {
                console.log($(this).html());
            })
        }
    });
    $('p').getText();
     $.fn.extend({
        getinnerhtml:function () {
            for(var i=0;i<this.length;i++){
                console.log(this[i].innerHTML);
            }
        }
    });
     console.log("----------------------")
     $("p").getinnerhtml()
</script>
</body>
</html>